{{#extend "stylesheets"}}
  <link rel="stylesheet" href="/stylesheets/blog/blog.css"/>
{{/extend}}

<div class="container">

  <div class="row">
    <div class="col-sm-3 ml-sm-auto blog-sidebar">
      {{> admin.side}}
    </div><!-- /.blog-sidebar -->

    <div class="col-sm-9 blog-main">
      <button class="js-add btn btn-sm btn-info">新增</button>
      <table class="table table-striped mt10">
        <tr>
          <th>序号</th>
          <th>类目名称</th>
          <th>博客数量</th>
          <th>操作</th>
        </tr>
        {{#each list}}
          <tr data-id="{{this.id}}" data-name="{{this.name}}">
            <td>{{addOne @index}}</td>
            <td>{{this.name}}</td>
            <td>{{this.num}}</td>
            <td>
              <button class="js-modify btn btn-sm btn-default">修改</button>
              <button class="js-del btn btn-sm btn-default">删除</button>
            </td>
          </tr>
        {{/each}}
      </table>
    </div><!-- /.blog-main -->



  </div><!-- /.row -->
</div>

<!-- 模态框（Modal） -->
<div class="modal" tabindex="-1" role="dialog" id="newCata">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title">新增目录</h4>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
      </div>
      <div class="modal-body">
        <div class="form-group form-inline">
          <label for="cataNname">目录名称：</label>
          <input type="text" class="form-control" id="cataNname" placeholder="目录名称" name="name" >
          <input type="hidden" name="id" value="">
          <input type="hidden" name="model" value="add">
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-info js-save">保存</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div>

{{#extend "scripts"}}
  <script src="/javascripts/catalog/catalog.js"></script>
{{/extend}}

